home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GEMFBIND / AESRSRC1.S < prev    next >
Text File  |  1993-03-26  |  3KB  |  93 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* AESFAST Public Domain GEM bindings.
  5. ;*
  6. ;*========================================================================
  7.  
  8.  
  9. ;*************************************************************************
  10. ;*
  11. ;* Resource manager routines 1 of 2.
  12. ;*
  13. ;*************************************************************************
  14.  
  15. ;-------------------------------------------------------------------------
  16. ; Define the offsets within the AES block storage area.
  17. ;-------------------------------------------------------------------------
  18.  
  19. aespb      =         0                    ; 'aespb' MUST be first!...
  20. pcontrl   =         0                    ;    Pointer to control array
  21. pglobal   =         4                    ;    Pointer to global array
  22. pintin      =         8                    ;    Pointer to intin array
  23. pintout   =        12                    ;    Pointer to intout array
  24. padrin      =        16                    ;    Pointer to adrin array
  25. padrout   =        20                    ;    Pointer to adrout array
  26.  
  27. control   =        24                    ; Control array is next...
  28. function  =        24                    ;    Function code
  29. sintin      =        26                    ;    size of intin
  30. sintout   =        28                    ;    size of intout
  31. sadrin      =        30                    ;    size of adrin
  32. sadrout   =        32                    ;    size of adrout
  33.  
  34. global      =        34                    ; Global array, needs no further def.
  35.  
  36. ;-------------------------------------------------------------------------
  37. ; rsrc_load
  38. ;-------------------------------------------------------------------------
  39.  
  40.           globl     _rsrc_load
  41. _rsrc_load:
  42. ;          .cargs    #4,ptr.l
  43.  
  44. ptr             =    4
  45.  
  46.           move.l    #$6E000101,d0       ; AControl  110,0,1,1
  47.           lea        ptr(sp),a0         ; -> addrin
  48.           jmp        aes_do
  49.  
  50. ;-------------------------------------------------------------------------
  51. ; rsrc_free
  52. ;-------------------------------------------------------------------------
  53.  
  54.           globl     _rsrc_free
  55. _rsrc_free:
  56.           move.l    #$6F000100,d0       ; AControl  111,0,1,0
  57.           jmp        aes_do
  58.  
  59. ;-------------------------------------------------------------------------
  60. ; rsrc_gaddr - The one AES function that uses 'addrout'...
  61. ;-------------------------------------------------------------------------
  62.  
  63.           globl     _rsrc_gaddr
  64. _rsrc_gaddr:
  65. ;          .cargs    #8,type,idx,paddr.l
  66.  
  67. type            =    8
  68. idx             =    10
  69. paddr            =    12
  70.  
  71.           link        a6,#-2
  72.  
  73.           lea        aesblock,a0             ; Since this function uses
  74.           move.l    paddr(a6),padrout(a0)  ; 'addrout', we will set it &
  75.           move.w    #1,sadrout(a0)            ; 'sadrout' here (into aespb).
  76.  
  77.           move.l    #$70020100,d0       ; AControl  112,2,1,0
  78.  
  79.           moveq.l    #-2,d1
  80.           lea        type(a6),a1
  81.           jsr        aes_call
  82.  
  83.           lea        aesblock,a0         ; Put sadrout and sintout back to
  84.           clr.l     padrout(a0)         ; zero, since all other functions
  85.           clr.w     sadrout(a0)         ; assume they will always be zero.
  86.  
  87.           move.w    -2(a6),d0
  88.           unlk        a6
  89.           rts
  90.  
  91. ;          end of code
  92.  
  93.